package main

import (
	"encoding/base64"
	"encoding/hex"
	"errors"
	"fmt"
	"strconv"
)

var (
	StrBase64 = `iVBORw0KGgoAAAANSUhEUgAAAHgAAAAoCAIAAAC6iKlyAAATy0lEQVR4nLxbeTxVW/tf5xzHMYuSKXNxzQoJhSYl6S2l8RaiFNVtuDRQSqXplrqGyqvQJMmQSpJQaZA5KRKROUOmzM76fXb73H22ffY56H1/7/fjj2d91/M8a+1nr/Wstc5eqHDs2Nre8wtW/y0ITrr+/+p/eontWE2CzZwhhDqyzjx0wCh99e/QHI1aj8FZTjI89CaBUTX/QmD8+l9y81m8QH3K1R8Qwhfa80fXWRbu6oVBCOPPxY7JCo9QjTjk2SOvQQh9tAcwfnam/VhdgeIdq365HxhcgS8nmZRqzttqf/Dd/7zp/wSTThzEF80jJHnre51XxeSUaW5VihR8bVrwuLNXfbjZkozoIlVK6KTjeGbX7OBRdHts+PF1JjJMxD6Q1r5rVMZkmjyDVKdiAmuO23zL4dHQ9plLV2lpkFYtLHHBZJ/Zt/FVGbv+RoU1ezahwpt81iiOdX/EozlOMKUvc00d8db1Y/K1s3szKX98qxomiy8aYfwq6rOyR3ZuHJ6v/DIFXzQqvAQhnBtzHy1qVS50WBsxpt7i4bCO10tCca7zLYTwjrg/xtg0HuemfM36FSYHxC/FZCTQIIg51v65esiP1QSF7TG5f02u+TXbX4Ow9ixMLhRwHL2h3vWxvT9pV5rPYnc8M2kl+90ggZb4IgQhtJeJRyk7k2Qk45jvJjg6Zj4bQujp9rXQ3xvP+ySeIm346ZkiUn63sh8mrxGSQgVVWjReR8hW48ltV6xolVOL5IqyxSM8q5QVJ9fkjcwqCzkhPPk99DUm//1BEEL4rcaNYJjbMjBCc2MB0FptxMnOj+a6QobYkWQor6Bb+KKkeiiSZ1eyZqXb1j95d0JWWprA7J82A5PrDh+FEF7e8JqHh4peC25VlOaRXs9PMAM7RqOG4lrVaAd7dFweKrBztImsBypsVmIl3KTHq7nZz9yZACFUZui2B9yRtNvDTe2qPCteJ0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VmffCE3TZ2eb0Ar2ZbN1+WvLw0zwVnapftz8Z9StGVN/7FPIL8dmvye5DcoNJcqNEMIXlyZiDHtE7ynhdV1zDHCMGr2umoILhHC9P/lerfXYCDc8Z0KS2wQYtokjE0syOxFCmP6M9fE/w6kFUzisnEZilcBallSyM3i3fi2uk7fCRvpbTB7tPwtxwuXhRVK+IGpU12QxvDh4n8AI7BfH5N/5AiK670II3xeR3xLhAZ2rY/sfCN4oyV8+VhM9P/a/tIwq0Jvb2Ol7GY3k6mpWEDvJ9jrPgRC2XAIFL5DJLlQ+Y6z90zUn31ZWclyjHg1SZdZCCD1Dtv+C7XpF4iDAo84/c3vAyHcka+2Qpv8vAAD//xX4Ytet2tc/AAAAAElFTkSuQmCCazU1aG14VDM0cDZhU2ltNmpMcVkvVlhvc1NBVjRRbHZ6ZktNWTgrVnpLcE1SQm1reXB4WVYxTE1lYXVWWitON3pYL3NEV29LTUdQZnNZOEtwN2Y2cGcxWXRzVlovQURPM005aW1UTTJjdFk9ANg=`
	StrRes16  = `89504e470d0a1a0a0000000d4948445200000078000000280802000000ba88a9720000151149444154789cbc5b793c555df7dff7ba37bae6595d42a8481ecda549a44148a60a11d5a3d4fb348847c68a34481a34e835445228451299ea491a2422438328c99c29c37587f3fb9cf7dce7dce3dcc1ade77d7feb73ff586bedb5d7defb7bf65e7bed7dce25421074d5ac031a8b42e42e8a1c793ea6198e6eb66c47f93b1fb7095fb1eb74ea429957a8e8ecd5376615a6f82bac78db74194fb3dfc3179e645609df139eb4bb7836b7522bbe494015c0afe0b9264d98261dbe5fc06936528d85a9c893ae18afe15794bae0f75f76fbff4616b445fc8af802cd93c6396ff96ff40726bfc209ff2d57dcd44833f8d3e0284ee91425cdcffecd43ce6a50cd788df2d27f298dd9d6baed4c61ba0403bd532601113cab6c2108aab15cf7b86d3da289ce69145cffb3b50f56ac4adf2d4cab58aa983ae3c5ebef3f5b8b1f35ef93ffb58adbbf492b9a150930885aad8d15dfd1522008924fbcb6ae1e86e8b0521c5ae478fd236dcb2c84af29bc82303c66f4dc370494d7cfc9ccdeb1f8d7ba8ea3e9ba195851ecf864eabb8d089f522ec56d6ff3c54db0c3f3b14f041bac0f4dfea91e46191ce4a92fbe52cdaf8a8aec3a219d8f113a22cecf8343a74fa4009bb2ecf9516d9e524714831f79d77e758220a8e01b67f5a598ae10b22bab37cfe2a92f917210d283005278508af2ea879527cf8027d3c122d23f74ab1b148cfc500db38782305107398bdbae6d37685d582ba4539d1c691f4d9d654d57f81978ddccff077d66d3dc1505eac45654cc1b508720a87a7f48c89ee2433bcdee880e638daded3d11e6f4275f9c9fab860778fa3f7a8620faec10b7de73cb1e61ba87228bc577229347bc22b9556045f8c10221c8b1db669941bc47933422ded8bb76d399fb588360ddbbc2f8e1a6c3b5d606df6c24e5184fc53201008926122e853f785a66ace85d972fed7d90e59c63ff5bf96d6e833d13edce7ebbb5fbd2d5a89d5b0000e45b74ba1d79648ff1b8b38f000023cc6116c41223511063fd8f596fb52dc6e85cde3abde2995845cde143281f70272674fd3601b5bb9cd7ca27b1511216689e8405f770adb56063726113dd44cdebfc97d97b821c5957793ab96ee4f931f61b2afa1af5dda75756952e0600acaed1c8d16bc4f914b9d4c5dc298fd5840c69048e1f65d6b474baedd2038be7de6be9fb0200a08c93983161be8dc1f64932da386fde69a1e1f6010000bd600e9a58648b14d596773401003e31764f2645091e2f8e7e0ee8073e1fd79cd446a141c12d977c3ab37f11bf5a36e65bd2b3d9c8e67dcf4dd1cd8c69bbd05c9c4f5dbc02515e2dcfa23147000085676b118dc91e5df8d910498ae2b2f354a72b8bcb21fa36e54bca6d3bb99bc8b4cdb6ba6d0e006854d8a3d17916d5d31843270af7d4b6bd0600cc533799aa6878af3ab167a8932442debbf4c46cd5a5a82537b877b732ad6345108da88e1bed43bca88408ed0713d7f4348be37559be3c07ee55fe3c62e6028467031da9d7b1af46116b7422c0d07b5121718d9c73fffb24c929d8a9879dbc1bf2a7a5aca8930bf7fbee1d0600b088aecef298ce0f719ee4f3d7fc2775d37f8c0cf2332010086ba72c0e34de4a218be18a3c872d2e8a6509709e501a9e53970200a0ca689eb24c8357c69f09b2fae701004c16a9f6b30993390eb1c4cedc5fa6e6bb54aa753300c0557c77c24054d12685e5373ad9a318defaf293b399ae710fbfca3cf14568caee53efa30efc6c6fdeb79f9aa2c4a9e5216b64b76873e6ce1f8f1aca108d9284dcd5f5c1ed03df0f445dea9cd88e28e750f5e2d70709f65c717a9be1fe18acc6ede6d2613afc083b7a34bf75c233404464445ff32152ba79ce3e735d27e17b2ee2a6c98c6f0000a8254636b9ec13be228fd0119c3c72d8719c8038f53fa2cf3d2d1649ecae4b8c483cdb1fd3dda8c3527e657675179dc940f4172d7dd7cb1ee894ca47c4c0a2bfaafb23d2ad3200002775d2ed3e594e6692b13ef50f05ced07a80f06bf59c9d67ef4578a7ebf3592c380268bfd60d89bcf653fdac375ca955f150184b9b56ab7495ccab86595b2ae02d97842b46500600d8a71a16df995b308d8a031d8bbbcdc545e99e4f115edde2c2e7ac5d386fd73f643be9980beed00ac553f91d07a4c524508da43c1c2264353e00000620fa384040f4e703efef2add0dd8611c842c5f0a003bc84a7e729bccece5ea678847daf3bee16e00405dfb6b543f4e447498054f73f21a7c2cc252cee76fabd5278e52b9a768553c547c55de3167542ae2f6a753fc89eb0080a1086b99b0215a572e00205d054ea21094056d863b3d97369b9466da0d21a29f944d585f3a0060639159e5a345a3c7c31ede46f9b29b5db32717b97e5a9e206000307cf772c52d5721fc8673fbd7aa265b997f5812b31dd14c905478e8caded3ed537ceb3ad85984d722e72d332db0a18cdf0c98067eaf03570000a96f2edda98c4594e67a8ede1fb28ea82f2ffa98816866aa2ef6597e06eb6171ebbb6295a908ffb264fb3ca37ff31b824c765a8fb9fda63aa31bd34ab2a82b2d9ac798e604e5cbfdad1e12828db0e414bae97ac00d5434b18a6d9dd984b341063ce8b79512162ba4db9ee17e6ea007e9c3c6711e43741aa267766b00c6a839689f6a2838ad64414c971053a626efc4dcac5fd6dd330fe1493b0a18974d71060a0d6a9d9a4de1a6b4b3fd8422bab94e793eb67499cbd0e3c4f1420e90d0f68aa6347b1c77c171a324df126784bffbc3d75ae2b8901eb9438d5044648ac87f4058884566756901229328d14610ed4394ac21b96aef8bb84ac35e5b8f655ba2e2e15aeb6f5f1326aaba626dde513c089f3d2b9a9ffe18e953149fd8dcdbf0b8fe1e3c724008b74aa54a6be27cee3f1670fa6028fc141f7d49339e842d32328f1e731c25d91e2ba7c93facebfa6c7b4efdf61fa89e50f8517bb9d6079d74c90f36fd42a302e25f57983294ea72ea9b5fb736373610e824884c6749f73127b432b41ae89a8d80c812ece1a43b1c10429e44042ef1c2cd68028120398ed2471b4044058accbe458e5653972ad1b40bca22671859e25ca9d5b836e925a00912bf39ae32675fd5639f3fef6d1ca2c39ecda6dab9cf63e7bf520bc5fa9e0dc37ba68eaa66d19428d542b41616dc926c0f0123aab739a295ce3b2f4ab5c9816374c9726054c4d15e9b94b3f9cb6a00c002e73cddfb13e2bbf501005ba70cc5be87978925756f42f1a128f713a42655c49e4822422c086271623d4592befa98e5b4d55abf997f7c938d3f8021e413a781f25b32d226a64c43811e2742961d2fd9f6e33b22ca53a4339d4e4b898ac3f9fe16db7d57d987eff5a66fef14e8737be686fb7e43e85acd80ce81d6b07c4fe47c385d65aeafe9391211ce52c4def5a4f5e459ceb707006489855b0c7b0b0fee98f4c7c75de7b42fb037437b1bc7b4f46400c03993ed7f14f20dff4553321ef8ee217d51134f5b4fa089020026fea6bc3270c94443651683d559df5d7cbeb42ea71e319e24f6dcf9adb099934f9cc608442a189a83880c1ae1b64bd8a6547f16c45e16969365c2cc2f4fbaa6aad4f7e4d52ecd79ee112fe3bcf879f39bea1ff6ee28166ee3ea5bfe64e866f985c11138581b6b5bbdbdb8f0fc35b30496952b3113ad88e28b803b7f9bd68b98fa99acc672a206ae09eba96a372a3e31993c562d9148a450e0e7074160608086ea47651da5be2a0fac2583167cf8fd28e98a3fe3c98ce825551ea7646bda23d829da419337f1ebd386fbe1fa721a325b331dc814f21bfbb4dfd2ec11839ce0c7afafbf8537f40dd3d71c35865328f3217a36ef1d432aeb669fc5467645893fbc8fb3cf26e30934a333c73412cb63cb3250e318eb80f9aafa0ee39d5287aef383385e629bdb8f5107968059377a6795f5cc2a6348c28151535e77e3cc5d0613d8c7e263ba15076b0d71f80aa6a7a7b516ed8727d3568fe43795cddc0644b9f697f7c301002d2d7d96369c9541bc22118e0a738fb7062d8077a42bfef019614995874f9c467b84f949f746e49713fc18411900b0c87336f93f8f0e451900b02a68a934550a00401fa297e72d8399ecf1397fb903003ea8fd85d8f8845c46983e8b8db4baaf08ff9bb116ea4446823aeee0eaafb57ee2c42154b92be39c8e0b2975e87a76301ca37326aa720f121ab0c3690ebdb2537362b0fa47645ecd514bdc22b19a86a20c00b8a7f9c2c83cba24db03f9a1fa73c1e7517e47fbef58878fc3d9598a8ab2148944e4eec38229f311864c1651569244f5ec19ed38bc2a592c775b66488c552052b0dbd12b2a3902eba2f56d479c752a2aee2fdb26262d3a3bf273d93e75ac59f02e5bb9320bede5ea6b8f99209a298156ef4332b9fb84a596fece9509bb115e9e22fdc81d9e0b556d1f9dd2fca1bf0f2c76d34d83976f17ec871fad3aaf9cfbaf36249ee469b621ca5f88bf7f2ad9864626919dc6e749ef9d5c1ee0e8928006100201449d71983f6f141a31f1cf2e5f2986673422278bc1879918abc086bdeccc2c2a3962fa5e69b442cf8597eff31b505152595c4c1a0ed3ee2b39a921c16a271c162fdcdef3dc0d45190080a0fc8ca8836acc52a355131ea0229dc548aae4885d83bd0b0a735810344359db7d36674fbb555d1059923cc4a0fd2c3a0080dc7fb52110e769b695647b9835289b352823b8bf5d1cc86dfff9e10c84e9969f82d59f68bf4d768223a159ef19adc90aaa5419b4883a510641d9bfe82daa5cbe8c3dea9fb826bde976efd3932f083f415fc9ed2e1c31ce2f9bb92af4e59425ec4b863929a5af36cc0500ac9b702ba305bf90f9d1daa4bd5f7a5a714a53adb967d6783121d6b6bba1af9a6b50bdc5d425c7ccf0677d9e34c7b8f8d5a3c5dcbb1c967eea4a1d9e5847fde2fcc35071b3dbb5da3a76cf7574946e24bae2ecd1482d08e83d030ea7d437933bd9796b9c556a6b4d07c25367aab8a6d9a296c37db4f6daaec1fe668a24f54cd38ebd6aec289c5f13e9ee06ef014b54b49eb4d6f36b68fad5f0a1966c8bdfd62262770b4b7602d140597bdb7fa6731f6de0c49384febfef515bbfded220719e0a928f731336457b2baadc77870d62e1f82093a12368917ec18cb7a65583ef3a2953157ee12551b1e4975e11f60a53194fca2ac45fe98d02ba91c2d4181419d3e99555c99df5dd08afc0687956ab123f9e1d551b4bbe26bb647057519d3dc125c506abb91445ddb99bbd5927175e8faa5b50e2a9c5b3b9b9abab4b73c6beda46f271146e9e93576e8ec7f757b0beebda3df9cdf8f30e3f5a527af3c9dc8d826d04cce8c4db832eb61414683846f344d9e3f20a9c46544a14e569aa3a28ca709ea02a553dae9c28326a17262b484eb7d489b3e21c384f0455a028c33bb0895389a7560ed3a8a7127f1bfed8f3b1302823109f746ff489d330328fe6994200007a4f6f0500f4272ac96fb67c79bc9ba79f4d7aa3aaec7d913a26ca386a7fd71a667024cc80bd5c5c6c29d852dea123f0f1b282138ee8bc083338e2571974cfbba0ea4e1d6ae35df93b92dea1947be8afb2a42a84278992deb517c776f038b3142896987618213cf5ee7b71ede3eff5e3f8f57ede4a89970ff15742cb5d138b125c101e3b8571b39b271514d34c17c333466fcd3de73f53dfcd4ef65b3f676afe0b015550728d699b7a6ed47547e178d11e227b7a91484482ecb00c901ba00f8893e173ecb721968a28a1ab6b60eccd101d86c5d736c01005239c7b3e87188b5387d65e7ef476af2df5ccede6dcfc0b0aad4b730fb19365390d991df99c9717a7dd22f7c7effb6eba48aee029ae89b0dc057eab9eb3f9eb717e4eee087f264f6eaf197c0a77658426900240632ed058b5559212db3f88eddbfbedeac49487ed374fa30ed1c3bd60c4b1f4d0307a65057e9f44e726964a82885976014b3e0f3c5117c7850ec10403bd35fa60acc7b1190eea091d1db38ad8c3e84cca53703643ed8ccca34558c0a481218abe9c141901a2a3efa1186260441c6165157a773ef7c3359623aeb77aa046986e5d6a3cbe53c317dec74e1dd53fe08f2dc245e16746df169670aee7633c73b75d64df7463113fa2a918d4d081f5e3fcc528695209c2f3c4d4af92734314fb6ce6d685e5dc3658a0b5b514e3ffedd46665ae9c998d1ab4b6f5d96f82d72ba1f7b3aad424ce857241d74253f9673c07ff43e964fd45cbfbbe7fdf6c11c0a6782b6db55ea6ba7ed8e2db7ec5b6e5c9d50f821efd5dca04e3f191178e3fcf36582e4cc12a1dec1fa6a6adc46aec5e6e35f1e8f11cfde5c64f1d947184222e73c69da7815f65d051d3bdfe056784f779597af853e4b4d23b0efd9dec97da63a4779647ac3303ef0876ca5a40253e676f6205c74a5ec4b29f2d9300aa9445ee1b570f84c267d667d1af8bc2d90f495e53d623cf11e787e7c4114059aaca280fc7ae7f467e9541d82b439e8125d9e30fc7e873a87888fce5107dd49534cec30c83085171f6c9100bf4aac946b99fe0e542a156e94dcac1c7e8e3e4d5cd5233cf771d13dce3ca5b7505c79e0ef50e23228300864904320b42a30a814030dca0b726d498bb6ebdff42ada3bc570c42425e51ce6a507fadf919ab995932586ec4dee87d32c44fae1b103c0a2c64c213eef1fce281456ab342dfb5ce7db2eb22bb33b4ec43ead3789c4d6164e9a21063e0ed9d77b7ae264c18d61f6cfec120406431bab8a2bc82b65c66d5975649e220f9174601b8c185e6da114a6f09ae623fdf23ed053c98e8e615570cadcb3a760bd3509a97a27d44c74ff5cdbfc6f8a8de23acc6c935f1dd7bf652d3d156bc716d0bae4af3b7de75b657fe33120c3d6d77e5f771df429b95023efd633159388df344ce57df6793385f72ce3facc0fe06b0bd0557c5c26b3eca33b36f0a680e82a06947ee4110a43e5083d357d278ff6d6206b5122b2efdc6fb3bd28de5de82dbc5129dc134363b377bc149e4b77ce5393a83094150598b2e6a33c1dd0529e500dd7f91f79f3e504a5bf840f84e60c987b259b081d8d25bdccadae04928df106b0741d04029fbabf858ffa19fea4089ff0f01a507d6fc04b808e96ca3d6d6b5060467a12823bffd4b2ebd2e6f9ae4cdfedcfb617e9d8d430c5244687ee33fd12054f092d9a35c70b60dff8658781a9eb65fac8e93e7926aa75e98b3d9632080a7b1aff4cee3bd97047863689b903e168ed9a8a1d2ec8af632e7153b92f22f0b306b7bec15d9b6ecb883157791d83699451e65057379df10e819865378bdcfd09da612766f975a67dfc808d3681967d49c18bdb93de59ad2867c67db15499cbc2a9da0e5785166786719b747d71fbbae1d1667859f14300cdd527aed5cf29a812eb7db0a0e2e9041c460a517c545543691c63e0743ffa210cef3fdea0e25592bb5ee4cfc470dff3b3a56ef71506b8c17de37535f57d7b470eba954991ddb17c11382c93a1cc2b9fb1de38b7fe030eabf50d6b7ef0a30ce8564f915b9c83c46f9ddcbda513e2e81f337264a47b6e0cef0a420304e18332f6d518449578b8520486272e22fb47561b21dbfa213dd6bb1e2cb658751feb415bc3dfc5f000000ffff4a27803232ba12fd0000000049454e44ae426082`
)

func main() {
	imgSrcHex, _ := Base64ToHex(StrBase64)
	fmt.Println(imgSrcHex)
	li := len(imgSrcHex)
	fmt.Println(li)
	eText := imgSrcHex[li-220 : li-4]
	fmt.Println(eText, ":", len(eText))
	fmt.Println("!!!-----------------")
	str := `h72QOIWUO+SKTmirY7Dsag==`
	sHex := StringToHex(str)
	s := len(sHex)
	fmt.Println(s)
	fmt.Println(strconv.Itoa(s))
	sLen := StringToHex(strconv.Itoa(s))
	hexTemp := imgSrcHex + sHex + "0f3a"
	//fmt.Println(hexTemp)
	fmt.Println(sHex)
	fmt.Println(sLen)
	_, _ = HexToBase64(hexTemp)
	fmt.Println("-------->")
	x := HexToInt("7562")
	fmt.Println(x)
	hex, err := IntToHex(x, 5)
	if err != nil {
		return
	}
	fmt.Println(hex)
	//StringToHex("test")
	h, _ := HexToString("6b3535686d7854333470366153696d366a4c71592f56586f7353415634516c767a664b4d59382b567a4b704d52426d6b7970785956314c4d656175565a2b4e377a582f7344576f4b4d4750667359384b70376636706731597473565a2f41444f334d39696d544d326374593d")
	fmt.Println("!!!!!!----")
	fmt.Println(h)
	fmt.Println("@@@@@@@@@12321=====")
	str1 := "4e4e617a646972686a736169434a443822302c302c312c302c337c7a7c732c302c31da83ff265bf"
	fmt.Println(len(str1))
	k1 := str1[:32]
	l1 := str1[32:34]
	hh1, _ := HexToString(k1)
	fmt.Println(hh1)
	fmt.Println(HexToInt(l1))
	fmt.Println(HexToString(str1[34 : 34+34]))
}

func Base64ToHex(base64Str string) (hexStr string, err error) {
	src, err := base64.StdEncoding.DecodeString(base64Str)
	if err != nil {
		fmt.Println("解码Base64失败", err)
		return
	}
	hexStr = StringToHex(string(src))
	return
}

func HexToBase64(hexStr string) (base64Str string, err error) {
	str, err := HexToString(hexStr)
	if err != nil {
		fmt.Println(err)
		return
	}
	src := []byte(str)
	base64Str = base64.StdEncoding.EncodeToString(src)
	return
}

func StringToHex(str string) (hexStr string) {
	src := []byte(str)
	dst := make([]byte, len(src)*2)
	hex.Encode(dst, src)
	hexStr = string(dst)
	return
}

func HexToString(hexStr string) (str string, err error) {
	src := []byte(hexStr)
	dstLen := 0
	srcLen := len(src)
	if len(src)%2 == 1 {
		dstLen = srcLen/2 + 1
	} else {
		dstLen = srcLen / 2
	}
	dst := make([]byte, dstLen)
	_, err = hex.Decode(dst, src)
	if err != nil {
		return
	}
	str = string(dst)
	return
}

func HexToInt(hexStr string) (value int) {
	n, err := strconv.ParseUint(hexStr, 16, 32)
	if err != nil {
		fmt.Println(err)
	}
	return int(n)
}

var (
	hexMap = map[int]string{
		0:  "0",
		1:  "1",
		2:  "2",
		3:  "3",
		4:  "4",
		5:  "5",
		6:  "6",
		7:  "7",
		8:  "8",
		9:  "9",
		10: "a",
		11: "b",
		12: "c",
		13: "d",
		14: "e",
		15: "f",
	}
)

func IntToHex(value int, capArgs ...int) (hexStr string, err error) {
	var tempHex int
	hexList := make([]int, 0)
	for {
		tempHex = value % 16
		value = value / 16
		if value == 0 {
			hexList = append(hexList, tempHex)
			break
		}
		hexList = append(hexList, tempHex)
	}
	hexLen := len(hexList)
	if len(capArgs) > 0 {
		cap := capArgs[0]
		if len(hexList) > cap {
			err = errors.New("16进制位数大于容量")
			return
		}
		for cap-hexLen > 0 {
			hexStr += "0"
			cap--
		}
	}
	for i := hexLen - 1; i >= 0; i-- {
		hexStr += hexMap[hexList[i]]
	}
	return
}
